Skip to main content

Migration Guide to 2.0

The Bluedot Flutter wrapper version 2.0.0 is a major update of our APIs.

Please note that the following changes are also included in this major update:

  • A new payload returned as part of Zone Entry and Exit Callbacks, enhancing the information available upon entering or exiting a zone.
  • The introduction of a new Tempo Callback that provides the user's ETA updates at runtime, allowing for real-time updates.
  • The Rule Download callback has been modified, and it no longer returns the list of ZoneInfo’s. Instead, this information can now be accessed from an existing API to fetch the ZoneInfo list.
  • Destinations have been added as a part of ZoneInfo, providing additional context.
  • A new API has been developed to fetch CustomEventMetaData set for a Point SDK session.
  • For Android users, permissions to use Foreground Service or to run Bluedot service in the Background must now be declared from the App.
  • For iOS users, App restart notification feature support is added.

Updated GeoTriggering Events

The updated geo-triggering events now provide detailed information about zone entry, exit, and updates, including properties such as notification type, app info, and zone details.

NameDescriptionEvent payload
didEnterZoneDevice enters a ZoneObject with the following properties:
  • notificationType: Entry
  • appInfo: App details
  • triggerEvents: Entry Event details with location Info and crossedFences
  • zoneInfo: Zone information with Id, name and customData
  • installRef: Unique ID assigned to the device
  • projectId: ProjectId of the Project used from Canvas
  • deviceInfo: Device Details
  • triggerChainId: unique ID assigned to a particular Entry event
didExitZoneDevice exits a ZoneObject with the following properties:
  • notificationType: Exit
  • appInfo: App details
  • triggerEvents: Exit Event details with location Info and corresponding entry event
  • zoneInfo: Zone information with Id, name and customData
  • installRef: Unique ID assigned to the device
  • projectId: ProjectId of the Project used from Canvas
  • deviceInfo: Device Details
  • triggerChainId: ID same as the corresponding Entry event
didUpdateZoneInfoUpdate from SDK about Zone’s downloadList of Zones downloaded can be fetched from BluedotPointSdk.getZonesAndFences()

New Tempo Event

A new Tempo Callback provides real-time ETA updates during the user's journey, offering details about estimated arrival times and destination information.

NameDescriptionEvent payload
tempoTrackingDidUpdateETA update for every Tempo event sent to backendObject with the following properties:
  • eta: Estimated time of arrival to a particular store
  • etaDirection: lessThan/greaterThan from the eta value
  • destination: Destination details of the store like address, location, and destinationId
  • triggerChainId: unique Id per Tempo session
const tempoEventChannel = MethodChannel(BluedotPointSdk.tempo);
tempoEventChannel.setMethodCallHandler((MethodCall call) async {
var args = call.arguments;
var tempoAlertTitle = 'Tempo Events';
switch (call.method) {
case TempoEvents.tempoTrackingDidUpdate:
// Handler Tempo ETA updates
break;
default:
break;
}
});

New API to getCustomEventMetaData

A new API allows you to fetch custom event metadata set for a Bluedot session. For more details on Custom Event Metadata, please refer to the documentation here.

BluedotPointSdk.getCustomEventMetaData().then((metadata) => {  
const message = `CustomEventMetaData: ${JSON.stringify(metadata)}`;
});

Example to fetch list of Zone Info’s:

To retrieve the updated list of Zone Information, you can use the following example. Note that the zoneInfoUpdate callback no longer directly returns zoneInfos. Instead, you should query the list of zones directly from the SDK using the getZonesAndFences method.

BluedotPointSdk.on("zoneInfoUpdate", () => { 
// zoneInfoUpdate callback no longer returns zoneInfos,
// query it directly from the SDK

BluedotPointSdk.getZonesAndFences().then((zoneInfos) => {
if (zoneInfos != null) {
const message = `Did Update ZoneInfo ${JSON.stringify(zoneInfos)}`;
console.log(JSON.stringify(zoneInfos))
}
});
});

Android Permissions change

For Android devices, the Bluedot service no longer declares Foreground and Background usage permissions in its Manifest. Therefore, we suggest adding the Foreground or Background usage permissions in your App's Manifest. For more details, refer below link Migration Guide to Android Point SDK 16

iOS App Restart Notification feature

More details about this feature can be found here: (App restart notification)

To use this feature in Flutter plugin, while starting the Geo-Trigger provide Restart Notification title and text as below:

String iosAppRestartNotificationTitle ='Restart Bluedot Service';
String iosAppRestartNotificationButtonText ='Restart';

BluedotPointSdk.instance.geoTriggeringBuilder()
.iosNotification(iosAppRestartNotificationTitle,iosAppRestartNotificationButtonText)
.start()